package cn.wolfcode.service;
import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.expression.spel.ast.BooleanLiteral;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

public interface IEmployeeService {
    void delete(Long id);
    void save(Employee employee, Long[] ids);
    Employee get(Long id);
    List<Employee> listAll();
    void update(Employee employee, Long[] ids);
    PageInfo<Employee> query(QueryObject qo);
    Employee login(@Param("username") String username, @Param("password") String password);

    /**
     * 修改密码
     * @param id
     * @param oldPassword
     * @param newPassword
     */
    void updatePassword(Long id, String oldPassword, String newPassword);
    void updatePassword(Long id,String newPassword);

    /**
     * 批量删除
     * @param ids
     */
    void batchDelete(Long[] ids);
    Employee selectByName(String name);

    /**
     * 导出
     * @return
     */
    HSSFWorkbook exportXls();

    /**
     * 导入
     */
    void importXls(HSSFWorkbook workbook);

    List<Employee>  selectByIds(HashSet<Long> ids);
    //修改用户状态  禁用
    void updateSelectById(Long id, boolean status);

    Employee selectById(Long id);

    List<Employee> selectByRoleSn(String... sns);
}
